﻿using Coolzon.UI.Core.Converters;
using Coolzon.UI.Core.Parts;
using Coolzon.UI.Core.Parts.Widgets;
using Coolzon.UI.Core.Properties;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coolzon.UI.Core
{
    /// <summary>
    /// </summary>
    public class CorePartLibrary : PartLibrary
    {
        public override void Install()
        {
            this.RegisterPart("Scene", typeof(Scene));
            this.RegisterPart("Area", typeof(Area));
            this.RegisterPart("Label", typeof(Label));
            this.RegisterPart("Image", typeof(Image));

            this.RegisterProperty(typeof(int), typeof(IntConverter), null);
            this.RegisterProperty(typeof(string), typeof(StringConverter), null);
            this.RegisterProperty(typeof(double), typeof(DoubleConverter), null);
            this.RegisterProperty(typeof(double?), typeof(DoubleConverter), null);
            this.RegisterProperty(typeof(bool), typeof(BoolConverter), null);
            this.RegisterProperty(typeof(System.Windows.Media.Brush), typeof(BrushConverter), null);
            this.RegisterProperty(typeof(System.Windows.Thickness), typeof(ThicknessConverter), null);
            this.RegisterProperty(typeof(System.Windows.Media.FontFamily), typeof(FontFamilyConverter), null);
            this.RegisterProperty(typeof(System.Windows.FontWeight), typeof(FontWeightConverter), null);
            this.RegisterProperty(typeof(System.Windows.Visibility), typeof(VisibilityConverter), null);
            this.RegisterProperty(typeof(System.Windows.TextAlignment), typeof(TextAlignmentConverter), null);
            this.RegisterProperty(typeof(DataSeriesFilter), typeof(DataSeriesFilterConverter), null);
            this.RegisterProperty(typeof(DataItemFilter), typeof(DataItemFilterConverter), null);
            this.RegisterProperty(typeof(BrushList), typeof(BrushListConverter), null);
        }
    }
}
